package com.example.klaraservice.dao;

import com.example.klaraservice.pojo.Brand;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : Glacialerisa
 * @date : 2023/5/28 11:31
 * @desc :
 */
@Mapper
public interface BrandMapper {
    /**
     * 获取所有品牌
     * @return
     */
    public List<Brand> selectAllBrand();

    /**
     * 获取用户拥有的品牌
     * @param id
     * @return
     */
    public List<Brand> selectAllBrandByUserId(int id);

    /**
     * 添加新品牌
     * @param brand
     * @param userId
     * @return
     */
    public boolean addBrand(@Param("brand") Brand brand, int userId);
//    public boolean updateBrandById(Brand brand);
}
